Listitem
Moz0.9.9A single row in a list box. The text of the listitem is specified either using listcell elements, or by placing a label attribute directly on the listitem element. You may also place other elements inside the listitem for more complex content.
More information about Listitem
Attributes:
Attributes inherited from XUL Element
This should be set to a letter that is used as a shortcut key. This letter should be one of the characters that appears in the label text for the listitem. This letter will typically be drawn underlined, although this behavior will be platform and skin specific. When the user presses ALT (or a similar key that varies on each platform) and the access key, the listitem will be activated from anywhere in the window.
Indicates whether the listitem is checked or not.
Set to an id of a command element that is being observed by the element.
If the label of the listitem is too small to fit in its given space, the text will be cropped on the side specified by the crop attribute. An ellipsis will be placed in place of the cropped text. If the box direction is right to left (rtl), the cropping is reversed.
- start: The text will be cropped on its left side.
- end: The text will be cropped on its right side.
- left: (Deprecated) The text will be cropped on its left side.
- right: (Deprecated) The text will be cropped on its right side.
- center: The text will be cropped on both sides.
- none: The text will be not be cropped using an ellipsis. However, the text will simply be cut off if it is too large. The side depends on the CSS text alignment.
This attribute will be set to true if the listitem is the current item. This is typically used by a theme to customize the focus ring.
The direction in which the child elements of the listitem are placed.
- ltr: The elements are placed left to right or top to bottom in the order they appear in the XUL code.
- rtl: The elements are placed right to left or bottom to top. This is reverse of the order in which they appear in the XUL code.
If this attribute is set to true, the listitem is disabled. This is usually drawn with the text in grey. If the listitem is disabled, the function of the button cannot be performed. Leave the attribute out entirely for a regular enabled button.
The URL of the image to appear on the listitem. If this is attribute is left out, no image appears. The position of the image is determined by the dir and orient attributes.
The label that will appear on the listitem. If this is left out, no text appears.
Used to specify whether the children of the listitem are oriented horizontally or vertically. The default value depends on the element. You can also use the '-moz-box-orient' style property.
- horizontal: Child elements of the listitem are placed next to each other in a row in the order that they appear in the XUL source.
- vertical: Child elements of the listitem are placed under each other in a column in the order that they appear in the XUL source.
You can make an item a checkbox by setting this attribute to the value 'checkbox'.
A value associated with the listitem. You may use it in a script for your own purposes.
Properties and Methods:
Properties and Methods inherited from XUL Element
This should be set to a letter that is used as a shortcut key. This letter should be one of the characters that appears in the label text for the listitem. This letter will typically be drawn underlined, although this behavior will be platform and skin specific. When the user presses ALT (or a similar key that varies on each platform) and the access key, the listitem will be activated from anywhere in the window.
If the focus is on the element, it is removed. The focus is not automatically placed on any other element. Essentially, this is used to call the onblur handler.
Gets and sets the value of the checked attribute.
Set to an id of a command element that is being observed by the element.
If true, the Control key must be pressed for the key to match. If false, the Alt key must not be pressed for the key to match. If unspecified, it doesn't matter whether the key is pressed or not. This will map to another key on platforms that do not have an Control key.
If the label of the listitem is too small to fit in its given space, the text will be cropped on the side specified by the crop attribute. An ellipsis will be placed in place of the cropped text. If the box direction is right to left (rtl), the cropping is reversed.
- start: The text will be cropped on its left side.
- end: The text will be cropped on its right side.
- left: (Deprecated) The text will be cropped on its left side.
- right: (Deprecated) The text will be cropped on its right side.
- center: The text will be cropped on both sides.
- none: The text will be not be cropped using an ellipsis. However, the text will simply be cut off if it is too large. The side depends on the CSS text alignment.
Gets and sets the value of the current attribute.
Executes the associated command.
Assigns the focus to the element, if it can accept the focus. The onfocus handler is called.
The URL of the image to appear on the listitem. If this is attribute is left out, no image appears. The position of the image is determined by the dir and orient attributes.
The label that will appear on the listitem. If this is left out, no text appears.
Indicates whether the listitem is selected or not.
A value associated with the listitem. You may use it in a script for your own purposes.